// store.js
import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    selectedKillChain: null,
  },
  mutations: {
    setSelectedKillChain(state, killChain) {
      state.selectedKillChain = killChain;
    },
  },
  actions: {
    selectKillChain({ commit }, killChain) {
      commit('setSelectedKillChain', killChain);
    },
  },
  getters: {
    getSelectedKillChain: (state) => state.selectedKillChain,
  },
});
